<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>
<script>
  let user = {
    name: "李唯一",
    age: 20,
    skill: ['黄龙剑', '祖上太极鱼', '隐身衣']
  }

  let { name: uname, age: uage } = user;
  console.log(uname, uage) //李唯一 20

  // 剩余运算符
  let { name, ...reset } = user
  console.log(name, reset)

  // 扩展运算符
  let option = {
    ...reset,
    eat: "牛肉面"
  }
  console.log(option);

</script>

</html>